VERSION 5.00
Begin VB.Form frmNews 
   Caption         =   "Add News"
   ClientHeight    =   3540
   ClientLeft      =   6090
   ClientTop       =   4875
   ClientWidth     =   4560
   ControlBox      =   0   'False
   LinkTopic       =   "Form1"
   ScaleHeight     =   3540
   ScaleWidth      =   4560
   Begin VB.CommandButton Command2 
      Caption         =   "Cancel"
      Height          =   375
      Left            =   120
      TabIndex        =   5
      Top             =   3120
      Width           =   1215
   End
   Begin VB.CommandButton Command1 
      Caption         =   "Send"
      Height          =   375
      Left            =   1440
      TabIndex        =   4
      Top             =   3120
      Width           =   1215
   End
   Begin VB.TextBox txtNews 
      Appearance      =   0  'Flat
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   9.75
         Charset         =   186
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   2055
      Left            =   120
      MultiLine       =   -1  'True
      ScrollBars      =   2  'Vertical
      TabIndex        =   3
      Top             =   960
      Width           =   4335
   End
   Begin VB.TextBox txtTitle 
      Appearance      =   0  'Flat
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   9
         Charset         =   186
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   285
      Left            =   120
      TabIndex        =   0
      Top             =   360
      Width           =   4335
   End
   Begin VB.Label lblNews 
      AutoSize        =   -1  'True
      Caption         =   "Text:"
      Height          =   195
      Left            =   120
      TabIndex        =   2
      Top             =   720
      Width           =   360
   End
   Begin VB.Label lblTitle 
      AutoSize        =   -1  'True
      Caption         =   "News Title:"
      Height          =   195
      Left            =   120
      TabIndex        =   1
      Top             =   120
      Width           =   795
   End
End
Attribute VB_Name = "frmNews"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private Sub Command1_Click()
    Dim i As Integer
    Dim newsarray As Variant
    Dim news As String
    newsarray = Split(txtNews.text, vbCrLf)
    'It adds `` where you go to new line
    news = Join(newsarray, "``")
    Call AddNews(txtTitle.text, news)
    For i = 1 To frmServer.Socket.count
        If isConnected(i) Then _
            Call Send_News(i)
    Next i
    Unload Me
End Sub

Private Sub Command2_Click()
    Unload Me
End Sub

Private Sub Form_Load()
    Dim prevs As Variant
    Dim news As String
    On Error GoTo error
    txtTitle.text = ReadINI("NEWS", "TITLE", App.Path & "\News\News.ini")
    news = ReadINI("NEWS", "NEWS", App.Path & "\News\News.ini")
    prevs = Split(news, "``")
    news = Join(prevs, vbCrLf)
error:
    txtNews.text = news
End Sub
